<?php 
/* ================================================================================
 * Events Calendar 
 *
 * main.php: This is the main file for Living Web.
 *
 * Author: Eric Hendrickson (enhendrickson@liberty.edu)
 * Date: 7/20/06
   ================================================================================ */
	
	global $SSO, $Security, $AppID, $User, $DB;
	//Check to see if there is a valid session 
	$SessionInfo = $SSO->isValidSession("index.php?action=login", $SSO->getSessionInformation());	
		
	//Check to see if the user has rights to be on LivingWeb
	$PageRights = array('ADMIN');
	$UserRoles = $Security->ValidateUser($SessionInfo['username'], $AppID, $PageRights, 1);
		
	//Grab the user info
	$UserInfo = $User->GetUserInfo($SessionInfo['username']);	
	
	if(isset($_GET['id']))
	{
			$DB->query("delete from calendar_events where event_id = '" . $_GET['id'] . "'");
	}
	
	header("Location: index.php?action=main");
?>